import React from 'react'
import LifeBannerBg from '../../../../components/lift_components/LifeBannerBg'
import LifeText from '../../../../components/lift_components/LifeText'
import AcarusService from '../../../../components/lift_components/AcarusService'
import bg04 from '../../../../static/images/life_img/bg_04.png'
import { getacarusnData } from '../../../../fetch/lifeService'

export default class AcarusKilling extends React.Component {
  constructor(){
    super();
    this.state = {
      data:{}
    }
  }
  componentDidMount(){
    getacarusnData()
    .then(res => {
      this.setState({
        data:res
      })
    })
  }
  render() {
    return(
      <div>
        <LifeBannerBg imgUrl={ bg04 } />
        {
          this.state.data
          ?(
            <div>
              <LifeText lifeTitle='专业除螨' lifeText={ this.state.data.context }/>
              <AcarusService servicePrice={this.state.data.servicePrice }/>
            </div>
          )
          :<div>数据正在加载中...</div>
        }

      </div>
    )
  }
}
